import request from '@/utils/request'

/*
  接口地址 /api/order/afterSale/getAfterSaleGoodsInfo
  请求方式 GET
  接口描述 获取售后申请页数据
*/
export function getAfterSaleGoodsInfo(orderGoodsId) {
  return request({
    url: '/order/afterSale/getAfterSaleGoodsInfo',
    method: 'get',
    params: {
      orderGoodsId: orderGoodsId
    }
  })
}

// 售后原因列表
export function listAfterSaleReason() {
  return request({
    url: '/order/afterSale/listAfterSaleReason',
    method: 'get'
  })
}

// 物流公司列表
export function listExpress() {
  return request({
    url: '/order/afterSale/listExpress',
    method: 'get'
  })
}

// 申请退款、退货退款
export function doRefundOrder(data) {
  return request({
    url: '/order/afterSale/doRefundOrder',
    method: 'post',
    data: data
  })
}

// 售后详情
export function getAfterSaleDetail(afterSaleId) {
  return request({
    url: '/order/afterSale/getAfterSaleDetail',
    method: 'get',
    params: {
      afterSaleId: afterSaleId
    }
  })
}
